/*
 * demo
 */
package com.open.httpauto;

/**
 * 参数格式：JSON,FORM,QUERY
 *
 * @author j20
 */
public enum HttpDataType implements java.io.Serializable {
    JSON,
    FORM,
    QUERY,
    ;

    /**
     * 根据状态名称查询状态
     *
     * @param stateName
     * @return
     */
    public static HttpDataType getEnum(String stateName) {
        for (HttpDataType enumName : HttpDataType.values()) {
            if (enumName.name().equalsIgnoreCase(stateName)) {
                return enumName;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return this.name();
    }

}
